package com.zhongcw.test.java.enumm;

public enum EmpEnum {

    ZCW("001","ZCW"),
    LPF("001","LPF");

    /**/

    public static EmpEnum getNameById(String id){
        for (EmpEnum empEnum : values()) {
            if (empEnum.getId().equals(id)) {
                return empEnum;
            }
        }
        return null;
    }

    /**/

    private String id;
    private String name;

    EmpEnum(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

}